import Vue from 'vue'
import request from '@/itsoftUI/utils/request'
import qs from "qs"
const baseUrl = Vue.prototype.$itsoftUI.config.serviceUrl + "/manager"
const baseUrls = Vue.prototype.$itsoftUI.config.serviceUrl + "/office"
const transactionApi = {
    //系统list
    systemList: function () {
        const data = {};
        return request({
            url: Vue.prototype.$itsoftUI.config.serviceUrl + '/auth/user/systemBaseinfoList',
            method: 'post',
            data: qs.stringify(data)
        })

    },
    //事务List
    Transaction: function (systemCode, pageIndex, pageSize, type, content, startTime, endTime) {
        const data = {
            systemCode,
            pageIndex,
            pageSize,
            type,
            content,
            startTime,
            endTime
        };
        return request({
            url: baseUrl + '/systemPersonalWait/transaction',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    //我的办公用房
    getMyOfficeHouse: function () {
        const data = {};
        return request({
            url: baseUrls + '/houseRoomIn/getMyOfficeHouse',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    getDetailByRoomInId: function (roomInId) {
        const data = { roomInId };
        return request({
            url: baseUrls + '/houseRoomIn/getDetailByRoomInId',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    roomInUserSave: function (data) {
        const config = {
            headers: {
                'Content-Type': 'application/json;charset=utf-8'
            },
        }
        return request.post(baseUrls + "/houseRoomIn/roomInUserSave", data, config)
    },
    //获职务信息
    getDataListByType: function (type) {
        const data = {
            type
        };
        return request({
            url: baseUrls + "/informationItems/getDataListByType",
            method: "post",
            data: qs.stringify(data)
        });
    },
}
export {
    transactionApi
}